home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- * *
- * Copyright (c) 1992, 1993 Ronald Joe Record *
- * *
- * All rights reserved. No part of this program or publication may be *
- * reproduced, transmitted, transcribed, stored in a retrieval system, *
- * or translated into any language or computer language, in any form or *
- * by any means, electronic, mechanical, magnetic, optical, chemical, *
- * biological, or otherwise, without the prior written permission of: *
- * *
- * Ronald Joe Record (408) 458-3718 *
- * 212 Owen St., Santa Cruz, California 95062 USA *
- * *
- *************************************************************************/
-
- #include "x.h"
-
-
- void
- go_down()
- {
- frame++;
- if (frame > maxframe)
- frame = 0;
- jumpwin();
- }
-
- void
- go_back()
- {
- frame--;
- if (frame < 0)
- frame = maxframe;
- jumpwin();
- }
-
- jumpwin()
- {
- extern image_data_t rubber_data;
-
- rubber_data.p_min = min_x = a_minimums[frame];
- rubber_data.q_min = min_y = b_minimums[frame];
- rubber_data.p_max = max_x = a_maximums[frame];
- rubber_data.q_max = max_y = b_maximums[frame];
- x_range = max_x - min_x;
- y_range = max_y - min_y;
- x_inc = x_range / (double)width;
- y_inc = y_range / (double)height;
- point.x = 0;
- point.y = 0;
- maxexp = minexp = 0;
- run = 1;
- x = min_x;
- y = min_y;
- Clear(trajec);
- Clear(crijec);
- Clear(which);
- if (resized[frame])
- Redraw();
- else
- redraw(indices[frame], perind[frame], 0);
- }
-
- void
- go_init()
- {
- frame = 0;
- jumpwin();
- }
-
- Destroy_frame()
- {
- static int i;
-
- for (i=frame; i<maxframe; i++) {
- periods[frame] = periods[frame+1];
- indices[frame] = indices[frame+1];
- perind[frame] = perind[frame+1];
- a_minimums[frame] = a_minimums[frame+1];
- b_minimums[frame] = b_minimums[frame+1];
- a_maximums[frame] = a_maximums[frame+1];
- b_maximums[frame] = b_maximums[frame+1];
- }
- if (maxframe)
- maxframe--;
- go_back();
- }
-
-